A rendering context, attached to a graphic window to present to the screen.
More...
A rendering context, attached to a graphic window to present to the screen.
◆ RenderContext()
nkGraphics::RenderContext::RenderContext |
( |
| ) |
|
◆ ~RenderContext()
virtual nkGraphics::RenderContext::~RenderContext |
( |
| ) |
|
|
virtual |
◆ getBackBuffer()
Texture* nkGraphics::RenderContext::getBackBuffer |
( |
| ) |
const |
- Returns
- The texture serving as a back buffer.
◆ getDepthBuffer()
Texture* nkGraphics::RenderContext::getDepthBuffer |
( |
| ) |
const |
- Returns
- The depth buffer associated to the context.
◆ getViewport()
Viewport* nkGraphics::RenderContext::getViewport |
( |
| ) |
const |
- Returns
- The viewport used.
◆ getCompositor()
Compositor* nkGraphics::RenderContext::getCompositor |
( |
| ) |
const |
- Returns
- The compositor the context is using. If nullptr, it means the default compositor within the CompositorManager is used.
◆ getContextWidth()
int nkGraphics::RenderContext::getContextWidth |
( |
| ) |
const |
- Returns
- The width, in pixels, of the context.
◆ getContextHeight()
int nkGraphics::RenderContext::getContextHeight |
( |
| ) |
const |
- Returns
- The height, in pixels, of the context.
◆ isWindowFocused()
bool nkGraphics::RenderContext::isWindowFocused |
( |
| ) |
const |
- Returns
- Whether the context window is focused (true) or not (false).
◆ getAttachedWin()
nkWinUi::GraphicsWindow* nkGraphics::RenderContext::getAttachedWin |
( |
| ) |
const |
- Returns
- The attached window in which the context renders.
◆ getOwnsWindow()
bool nkGraphics::RenderContext::getOwnsWindow |
( |
| ) |
const |
- Returns
- Whether the context owns the window (true) or not (false). A context owns a window when it is not fed a window from external code.
◆ setCompositor()
void nkGraphics::RenderContext::setCompositor |
( |
Compositor * |
value | ) |
|
Sets the compositor the context should be rendered with.
- Parameters
-
value | The compositor to use. Can be reset with nullptr. |
◆ setOwnsWindow()
void nkGraphics::RenderContext::setOwnsWindow |
( |
bool |
value | ) |
|
Sets whether the context owns the window it is attached to.
- Parameters
-
value | Whether the context owns the window (true) or not (false). |
◆ setGammaCorrected()
virtual void nkGraphics::RenderContext::setGammaCorrected |
( |
bool |
value | ) |
|
|
pure virtual |
Sets whether the context should be gamma corrected or not.
- Parameters
-
value | Whether the context should be gamma corrected (true) or not (false). |
◆ initialize()
virtual void nkGraphics::RenderContext::initialize |
( |
nkWinUi::GraphicsWindow * |
window | ) |
|
|
pure virtual |
Initializes and loads all internal memory necessary.
◆ swap()
virtual void nkGraphics::RenderContext::swap |
( |
| ) |
|
|
pure virtual |
Part of the rendering logic. In theory, should not be called by external code.
◆ refreshBufferSize()
virtual void nkGraphics::RenderContext::refreshBufferSize |
( |
unsigned int |
width = 0 , |
|
|
unsigned int |
height = 0 |
|
) |
| |
|
pure virtual |
Callback for when the window size changes. Can also be used to resize manually the surfaces (window, texture) the context owns.
- Parameters
-
width | The wanted width of the surface, in pixels. |
height | The wanted height of the surface, in pixels. |
◆ refreshViewportSize()
virtual void nkGraphics::RenderContext::refreshViewportSize |
( |
| ) |
|
|
virtual |
Callback for when the window size changes.
The documentation for this class was generated from the following file: